package com.yonyou.cyxdms.sysAuth.service.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
@TableName("tt_dealer_brand")
public class DealerBrandPO extends DMSBasePO<DealerBrandPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 品牌与经销商关联ID
     */
        @TableId(value = "RELATION_ID", type = IdType.AUTO)
        private Integer relationId;
    /**
     * 经销商代码
     */
    @TableField("DEALER_CODE")
    private String dealerCode;
    /**
     * 品牌代码
     */
    @TableField("BRAND_CODE")
    private String brandCode;
    /**
     * 是否关联
     */
    @TableField("IS_RELATED")
    private Integer isRelated;
    /**
     * 品牌ID
     */
    @TableField("BRAND_ID")
    private Integer brandId;
    /**
     * 数据来源
     */
    @TableField("DATA_SOURCES")
    private Integer dataSources;
    /**
     * 传值经销商代码
     */
    @TableField("DLR_CODE")
    private String dlrCode;
    /**
     * 是否主品牌
     */
    @TableField("PRIMARY_BRAND")
    private Integer primaryBrand;
    /**
     * 所属部门
     */
    @TableField("ORG_ID")
    private Integer orgId;
    @TableField("IS_DELETED")
    @Version
    private Boolean isDeleted;

    public DealerBrandPO() {
        super();
    }


    public Integer getRelationId() {
        return relationId;
    }

    public void setRelationId(Integer relationId) {
        this.relationId = relationId;
    }

    public String getDealerCode() {
        return dealerCode;
    }

    public void setDealerCode(String dealerCode) {
        this.dealerCode = dealerCode;
    }

    public String getBrandCode() {
        return brandCode;
    }

    public void setBrandCode(String brandCode) {
        this.brandCode = brandCode;
    }

    public Integer getIsRelated() {
        return isRelated;
    }

    public void setIsRelated(Integer isRelated) {
        this.isRelated = isRelated;
    }

    public Integer getBrandId() {
        return brandId;
    }

    public void setBrandId(Integer brandId) {
        this.brandId = brandId;
    }

    public Integer getDataSources() {
        return dataSources;
    }

    public void setDataSources(Integer dataSources) {
        this.dataSources = dataSources;
    }

    public String getDlrCode() {
        return dlrCode;
    }

    public void setDlrCode(String dlrCode) {
        this.dlrCode = dlrCode;
    }

    public Integer getPrimaryBrand() {
        return primaryBrand;
    }

    public void setPrimaryBrand(Integer primaryBrand) {
        this.primaryBrand = primaryBrand;
    }

    public Integer getOrgId() {
        return orgId;
    }

    public void setOrgId(Integer orgId) {
        this.orgId = orgId;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.relationId;
    }

    @Override
    public String toString() {
        return "DealerBrandPO{" +
        "relationId=" + relationId +
        ", dealerCode=" + dealerCode +
        ", brandCode=" + brandCode +
        ", isRelated=" + isRelated +
        ", brandId=" + brandId +
        ", dataSources=" + dataSources +
        ", dlrCode=" + dlrCode +
        ", primaryBrand=" + primaryBrand +
        ", orgId=" + orgId +
        ", isDeleted=" + isDeleted +
        "}";
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "relationId");
    }


}
